export function transformWWW(data) {
    let arr = []
    for (let name in data) {
      arr.push(encodeURIComponent(name) + '=' + encodeURIComponent(data[name]))
    }
    arr.push(('v=' + Math.random()).replace('.', ''))
    return arr.join('&')
}

export function getFilename(url, key='filename') {
    try {
        const map = JSON.parse(sessionStorage.getItem(`wbiokr_${url}`))
        return map[key || 'filename'] || ''
    } catch (error) {
        console.warn(error)
        return ''
    }
}
